// region 出参对象定义

/**
 * 前后端交互对象
 */
export interface ResponseDataType<T = any> {
    status: boolean
    code: string
    data: T
}

/**
 * 统计对象
 */
export interface SummaryType {
    summary?: Recordable
}

/**
 * 分页对象
 */
export interface PaginationType<T = any> extends SummaryType {
    pageNum: number
    pageSize: number
    totalRow: string
    rows: T[]
}

// endregion

// region 入参对象定义

/**
 * 排序
 */
export type OrderBy = "ascend" | "descend"
export type QueryComparator = "EQ" | "GT" | "EGT" | "LT" | "ELT" | "BETWEEN" | "LIKE" | "PRE_LIKE" | "IN"

/**
 * 排序对象
 */
export interface SorterType {
    property: string
    order: OrderBy
}

/**
 * 动态查询条件
 */
export interface QueryCondition {
    property: string
    mode: QueryComparator
    values: any[]
}

export interface PaginationBO {
    page: number
    pageSize: number
    conditions: QueryCondition[]
    queryFields: string[]
    sorter: SorterType[]
}

export interface IdsBO {
    ids: (string | number)[]
}

export interface IdBO {
    id: string | number
}

// endregion
